<head>
	<link rel="stylesheet" href="assets/css/blogview.css">
</head>
<?php
$acount = (int)$conf->a['articles-count-digradio'];
$rcount = (int)$conf->a['reviews-count-digradio'];
?>
<div class='c-box-600 c-box c-box-left' id='article-view'>
 <h3>Blogs</h3>

 	<?php
	$ctr = 1;
  	foreach($posts as $x)
         {
  		
               if($x['post_type']=='blog'){
		$md = $blogview->get_metadata($x,1);	
		$date_timestamp=wp_mktime($x['start']);	

		if($ctr==1)
		  $prev = date("M j",$date_timestamp);
		
		if($prev!=date("M j",$date_timestamp) || $ctr==1)
		{
		  echo 	"<span class='blog-date'>".date("M j, Y",$date_timestamp)."</span><hr />";
		  $prev = date("M j",$date_timestamp);	
		}
			
               	$authordata = $blogview->get_author_data($x['id']);	
					?>
					<div class="blog-author">		
					
							Posted by:<br />
							<?php echo $authordata['name']; ?><br />
							<img height="60" width ="60" src="<?php echo ap($authordata['thumb']);?>" ></a>
					</div>
					<div class="blog-content">
						<h5><a href='blog/<?PHP echo $x["id"];?>/<?PHP echo csq($x["title"]);?>' title="<?PHP  echo strip_tags($x['secondary']);?>"><?php echo $x['title']; ?></a></h5>	
						<img src="a/show-resized.php?file=<?PHP echo $x['image'];?>&x=450&y=285" alt="<?PHP  echo $x['title'];?>">
						<?PHP
								     	$paragraph = explode (' ', $x['content']);
  										$paragraph = array_slice ($paragraph, 0, 50);
  										$paragraph = implode (' ', $paragraph);
								    	echo $paragraph."...";?>				
				<a href='blog/<?PHP echo $x["id"];?>/<?PHP echo csq($x["title"]);?>' title="<?PHP  echo strip_tags($x['secondary']);?>">Read More</a>
					</div>
					<hr class="divider">
					<?php   
				 $ctr++;           
   				}
			}
        ?>
</div>
<div class='c-box-headline c-box-300 ad-med-300-250 c-box-right'>
        <?PHP

        global $conf;
        $ad_m = new ads();
        $ad_m->zone=5;
        $ad_m->category=$conf->qm[1];
        $ad_m->serve_image_ad();
        ?>

</div>
<div class='c-box-300 c-box article' id='article-home'>
      	<h3>News</h3>
      	<?php
         
            	$items=0;
               foreach($posts as $x)
               {
               if($x['post_type']=='news' && $x['w']<=$acount){	
					?>
					
						<li  class='article-image' id="article-image-<?php echo $x['id'];?>">	
            			<a class='article-image-holder' href='news/<?PHP echo $x["id"];?>/<?PHP echo csq($x["title"]);?>'>
            			<img height="60" width ="60" src="<?php echo ap($x['thumb']);?>" ></a>
							<span class='ptitle'><a href='news/<?PHP echo $x["id"];?>/<?PHP echo csq($x["title"]);?>'>
							<?PHP echo $x['title'] ?></a></span>
							<?PHP echo $x['secondary']; ?>
						</li>					
					<?php               
						}
               }
         ?>
	<li class="more-right">
          	<a class='mgalleries' href="newsview/<?php echo $parent['id']; ?>">More News</a>
          </li>
      </div>
<div class='c-box-300 c-box article' id='article-home'>
      	<h3>Features</h3>
      	<?php
         
            	$items=0;
               foreach($posts as $x)
               {
               if($x['post_type']=='article' && $x['w']<=$acount){	
					?>
					
						<li  class='article-image' id="article-image-<?php echo $x['id'];?>">	
            			<a class='article-image-holder' href='blog/<?PHP echo $x["id"];?>/<?PHP echo csq($x["title"]);?>'>
            			<img height="60" width ="60" src="<?php echo ap($x['thumb']);?>" ></a>
							<span class='ptitle'><a href='blog/<?PHP echo $x["id"];?>/<?PHP echo csq($x["title"]);?>'>
							<?PHP echo $x['title'] ?></a></span>
							<?PHP echo $x['secondary']; ?>
						</li>					
					<?php               
						}
               }
         ?>
	<li class="more-right">
          	<a class='mgalleries' href="features/<?php echo $parent['id']; ?>">More Features</a>
          </li>
      </div>
       <div class='c-box-300 c-box review' id='article-home'>
      	<h3>Reviews</h3>
      	<?php
         
            	$items=0;
               foreach($posts as $x)
               {
               if($x['post_type']=='review' && $x['w']<=$rcount){	
					?>
					
						<li  class='article-image' id="article-image-<?php echo $x['id'];?>">	
            			<a class='article-image-holder' href='review/<?PHP echo $x["id"];?>/<?PHP echo csq($x["title"]);?>'>
            			<img height="60" width ="60" src="<?php echo ap($x['thumb']);?>" ></a>
							<span class='ptitle'><a href='review/<?PHP echo $x["id"];?>/<?PHP echo csq($x["title"]);?>'>
							<?PHP echo $x['title'] ?></a></span>
							<?PHP echo $x['secondary']; ?>
						</li>					
					<?php               
						}
               }
         ?>
	<li class="more-right">
          	<a class='mgalleries' href="reviewview/<?php echo $parent['id']; ?>">More Reviews</a>
          </li>
      </div>
